{extend name="$LAYOUT_HOME_BASE" /}
{block name="title"}关联账号 -{:WSTConf('CONF.mallName')}{__block__}{/block}
{block name="meta"}
<meta name="description" content="{:WSTConf('CONF.seoMallDesc')}">
<meta name="Keywords" content="{:WSTConf('CONF.seoMallKeywords')}">
{/block}
{block name="css"}
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
<link href="__STYLE__/css/login.css?v={$v}" rel="stylesheet">
<link href="__ROOT__/addons/thirdlogin/view/home/index/index.css?v={$v}" rel="stylesheet">
<style type="text/css">
.wst-login-tr .wst-login-input{width: 400px!important;}
.wst-regist-obtain{position: absolute;left:295px;top:5px;}
#entry .form2{right: auto!important;width: 100%!important;}
.wst-login-code, .wst-regist-code{border: 0!important;position: relative;}
</style>
{/block}
{block name="top"}
	{include file="$LAYOUT_HOME_TOP" /}
{/block}

{block name="header"}
	
{/block}
{block name="main"}
{php}$registerTypeArr = explode(',',WSTConf('CONF.registerType'));{/php}
	<input type="hidden" id="token" value='{:WSTConf("CONF.pwdModulusKey")}'/>
	<div class="wst-container">
		<div class='wst-login'>
		    	<div class="w1" id="entry">
		    		<?php if($info){ ?>
		        		<div class="wst-wx-info">
		        			&nbsp; <img src="{$info['userPhoto']}">
		        			&nbsp;Hi, {$info['userName']} 欢迎来{:WSTConf('CONF.mallName')}
		        		</div>
		        	<?php } ?>
		        	<div class="mc " id="bgDiv" style="position:relative; height:600px;">
		        	<div class="wst-wx-bin">
		        		<div class="bin selected" onclick="toChoice(this,1);">已有帐号，请绑定</div>
		        		<div class="bin" onclick="toChoice(this,0);">没有帐号，请完善资料</div>
		        	</div>
		            <div class="form form2" id="binding">
		                <form id="login_form"  method="post" autocomplete="off">
						<table class="wst-table">
							<tr class="wst-login-tr">
								<td class="wst-regist-td"><font color='red'>*</font>用户名</td>
								<td>
								<input id="loginName1" name="loginName1" class="ipt wst-login-input"  tabindex="1" value="" autocomplete="off" type="text" data-rule="用户名: required;" placeholder="用户名" onkeyup="javascript:WST.isChinese(this,1)"/>
								</td>
							</tr>
							<tr class="wst-login-tr">
								<td class="wst-regist-td"><font color='red'>*</font>密码</td>
								<td>
								<input id="loginPwd1" name="loginPwd1" class="ipt wst-login-input" tabindex="2" autocomplete="off" type="password" data-rule="密码: required;" data-msg-required="请填写密码" placeholder="密码"/>
								</td>
							</tr>
							
							<tr class="wst-login-tr">
								<td class="wst-regist-td"><font color='red'>*</font>验证码</td>
								<td>
									<div class="wst-regist-code">
									<input id="verifyCode1" style="ime-mode:disabled" name="verifyCode1"  class="ipt wst-login-input " tabindex="6" autocomplete="off" maxlength="6" type="text" data-rule="验证码: required;" data-msg-required="请输入验证码" data-tip="请输入验证码" data-target="#verifyCodeTips1" placeholder="验证码"/>
									<img id='verifyImg1' class="wst-regist-codeim" src="{:url('home/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg1")' style="position: absolute; width:116px;border-top-right-radius:6px;border-bottom-right-radius:6px;  left: 22px;"><span id="verifyCodeTips1"></span>    	
								   	</div>
								</td>
							</tr>
							<tr class="wst-login-tr">
								<td colspan="2" style="padding-left:180px;">
								<label>
									<input id="rememberPwd1" name="rememberPwd1" class="ipt wst-login-ch" checked="checked" type="checkbox"/>记住密码
			     				</label>                                      
					                       
									<label style="float:right;margin-top:3px;">看不清？<a style="color:#69b7b5;" href="javascript:WST.getVerify('#verifyImg1')">换一张</a></label>
								</td>
							</tr>
						
							<tr style="height:80px;">
								<td colspan="2" style="padding-left:218px;">
									<input id="login_butt" class="wst-regist-but" type="button" value="立即绑定" style="width: 180px;height:30px;" onclick="login(1);"/>
								</td>
							</tr>
						</table>
						</form>
		            </div>
		           <div class="form form2 hide wst-register_r" id="register">
		           <div id='tab1' class="wst-tab-box">
		           	<ul id='goodsTabs1' class="wst-tab-nav">
						{if in_array(2,$registerTypeArr)}<li>手机注册</li>{/if}
						{if in_array(1,$registerTypeArr)}<li>账号注册</li>{/if}
					</ul>
					<div class="wst-tab-content">
					{if in_array(2,$registerTypeArr)}
					<div class="wst-tab-item">
					<form id="reg_form"  method="post" autocomplete="off">
						<table class="wst-table">
							<tr class="wst-login-tr">
								<td class="wst-regist-td"><font color='red'>*</font>手机号</td>
								<td><input id="loginName" name="loginName" class="tb_ipt wst-regist-input" tabindex="1" maxlength="30" autocomplete="off" onpaste="return false;" style="ime-mode:disabled;" placeholder="手机号"  type="text" onkeyup="javascript:WST.isChinese(this,1)"/></td>
							</tr>
							<tr class="wst-login-tr">
								<td class="wst-regist-td"><font color='red'>*</font>密码</td>
								<td><input id="loginPwd" name="loginPwd" class="tb_ipt wst-regist-input" tabindex="2" style="ime-mode:disabled;" autocomplete="off" type="password" placeholder="6-16位字符"/></td>
							</tr>
							<tr class="wst-login-tr">
								<td class="wst-regist-td"><font color='red'>*</font>确认密码</td>
								<td><input id="reUserPwd" name="reUserPwd" class="tb_ipt wst-regist-input" tabindex="3" autocomplete="off" type="password" placeholder="6-16位字符"/></td>
							</tr>
							<tr id="mobileCodeDiv" class="wst-login-tr">
								<td class="wst-regist-td"><font color='red'>*</font>短信验证码</td>
								<td style="position: relative;">
									<input maxlength="6" autocomplete="off" tabindex="6" class="tb_ipt wst-regist-input" name="mobileCode" style="ime-mode:disabled" id="mobileCode" type="text" data-target="#mobileCodeTips" placeholder="短信验证码"/>
									<button id="timeTips" onclick="getVerifyCode();" class="wst-regist-obtain">获取短信验证码</button>
									<span id="mobileCodeTips"></span>
								</td>
							</tr>
							<tr class="wst-login-tr">
								<td colspan="2" style="padding-left:180px;">
									<label>
										<input id="protocol" name="protocol" type="checkbox" class="tb_ipt" value="1" data-rule="checked"/>我已阅读并同意
						           		<a href="javascript:;" style="color:#69b7b5;" id="protocolInfo" onclick="showProtocol();">《用户注册协议》</a>
						           	</label>
								</td>
							</tr>
							<tr style="height:80px;">
								<td colspan="2" style="padding-left:260px;">
									<input id="reg_butt" class="wst-regist-but" type="submit" value="立即注册" style="width: 180px;height:30px;"/>
								</td>
							</tr>
						</table>
						</form>
					</div>
					{/if}

					{if in_array(1,$registerTypeArr)}
					<div class="wst-tab-item">
						<form id="reg_form2"  method="post" autocomplete="off" onsubmit="return false;">
							<table class="wst-table">
								<tr class="wst-login-tr">
									<td class="wst-regist-td" style="width: 200px;line-height: 45px"><font color='red'>*</font>用户名</td>
									<td><input id="loginName2" name="loginName" class="tb_ipt2 wst-regist-input" tabindex="1" maxlength="30" autocomplete="off" onpaste="return false;" style="ime-mode:disabled;" placeholder="6位以上数字、字母或下划线"  type="text" onkeyup="javascript:WST.isChinese(this,1)" data-rule="用户名: required;" data-msg-required="请填写用户名" data-tip="请输入用户名"/></td>
								</tr>
								<tr class="wst-login-tr">
									<td class="wst-regist-td"><font color='red'>*</font>密码</td>
									<td><input id="loginPwd2" name="loginPwd" class="tb_ipt2 wst-regist-input" tabindex="2" style="ime-mode:disabled;" autocomplete="off" type="password" placeholder="6-16位字符" data-rule="密码: required;" data-msg-required="请填写密码" data-tip="请输入密码"/></td>
								</tr>
								<tr class="wst-login-tr">
									<td class="wst-regist-td"><font color='red'>*</font>确认密码</td>
									<td><input id="reUserPwd2" name="reUserPwd" class="tb_ipt2 wst-regist-input" tabindex="3" autocomplete="off" type="password" placeholder="6-16位字符" data-rule="确认密码: required;" data-msg-required="请填写确认密码" data-tip="请输入确认密码"/></td>
								</tr>
								<tr class="wst-login-tr">
									<td class="wst-regist-td"><font color='red'>*</font>图形验证码</td>
									<td><input id="verifyCode" style="ime-mode:disabled;margin-left: 20px; width: 266px;" name="verifyCode"  class="tb_ipt2 wst-regist-codemo" tabindex="6" autocomplete="off" maxlength="6" type="text" data-rule="验证码: required;" data-msg-required="请输入验证码" data-tip="请输入验证码" data-target="#verify" placeholder="验证码" />
										<img id='verifyImg' class="wst-login-codeim-1" src="{:url('home/index/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")' style="width:125px;height:36px;border-top-right-radius:6px;border-bottom-right-radius:6px;float: right;margin-top: 1px;">
										<span id="verify"></span>
									</td>
								</tr>
								<tr class="wst-login-tr">
									<td class="wst-regist-td"></td>
									<td>
										<label style="margin-left: 20px;padding-right: 120px;">
											<input id="protocol2" name="protocol" type="checkbox" class="tb_ipt2" value="1" data-rule="checked" data-msg="请同意后才能注册"/>我已阅读并同意
											<a href="javascript:;" style="color:#69b7b5;" id="protocolInfo2" onclick="showProtocol();">《用户注册协议》</a>
										</label>
									</td>
								</tr>
								<tr style="height:80px;">
									<td colspan="2" style="padding-left:260px;">
										<input id="reg_butt2" class="wst-regist-but" type='submit' onclick='javascript:register()' value="注册" style="width: 180px;height:30px;"/>
									</td>
								</tr>
							</table>
						</form>
					</div>
					{/if}
		           	</div>
		            </div>
		            </div>
		        </div>
		    </div>
		</div>
	</div>
{/block}
{block name="footer"}
	{include file="$LAYOUT_HOME_FOOTER" /}
{/block}
{block name="js"}
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
<script type='text/javascript' src='__STYLE__/js/login.js?v={$v}'></script>
<script type='text/javascript' src='__ROOT__/addons/thirdlogin/view/home/index/index.js?v={$v}'></script>
<script type='text/javascript'>
$(function(){
	initRegist();
	$('#tab1').TabPanel({tab:0,callback:function(no){
		if(no==1);
		if(no==2);
	}});
})
</script>
{/block}